home *** CD-ROM | disk | FTP | other *** search
- Submitted-by: dave@88open.org (Dave Cline)
-
- [ A surprise! An article that actually mentions a standard or two! -- mod ]
-
- >In article <1ovqhcINNseh@ftp.UU.NET>
- > jeffrey@netcom.com (Jeffrey Kegler) writes:
-
- Note to Jeffrey: IMO, your repeated ad hominem attacks are
- unprofessional.
-
- [ And no more will be tolerated by me. I will shamelessy use my
- editorial ability to remove them, if necessary. Anything Dave
- and Jeffrey have to say about each other they can say in private
- from now on. Both parties, and third parties, have expressed
- unhappiness at the way the discussion has gone, and I apologise
- heartily for that. My only excuse is that I have been replacing
- my computer system, and was somewhat distracted. I will try not
- to let it happen again -- mod ]
-
- >The readership of comp.std.unix should be able to spot the above
- >reading of the standard as wrong with no trouble. As a reading of ANSI
- >X3.159-1989, section 2.2.4.2.1 shows, INT_MAX is a *minimum* -- the
- >standard gives a magnitude they must be at least as large as, but
- >implementors may define their magnitudes larger.
-
- Sure, an *implementation* is free to extend the range of
- integers beyond the minimum guaranteed INT_MAX value. That's a
- given. However, the context of this discussion is test method
- standards and test suites for various Unix standards (not just
- the misapplication of Turing machine models). The rules are
- obviously a bit different for test suites, (or at least it seems
- to me that it should have been obvious).
-
- A test method implementation that blindly stores a value greater
- than the minimum guaranteed value of INT_MAX into an int is
- incorrect, or at least not strictly conforming according to the
- ANSI C and POSIX.1 rules. A standard conforming C compilation
- system could (quite properly) reject such a test implementation
- if the implementation supported only a 16 bit ints. If the
- conformance test suite isn't portable, it isn't a valid test of
- system conformance. So while INT_MAX may not constrain an
- implementation, it does constrain a test suite.
-
- >sizeof(char *) is
- >implementation defined, pure and simple (3.3.3.4, 3.3.4, F.3.7).
-
- Agreed, sizeof(char *) is implementation defined. But it must be
- finite.
-
- The reasoning is as follows: a conforming compilation system
- must accept all strictly conforming programs (X3.159-1989
- section 1.7). A strictly conforming program that computes (at
- runtime) the usual idiom for the number of elements in an array
- of character pointers (sizeof(x)/sizeof(x[0])) would fail if
- sizeof(char *) was unbounded because +infinity/+infinity makes
- no arithmetic sense. OK?
-
- >But suppose it were right. Is a memory which can consist of an
- >infinite number of finite words, infinite in extent, or finite?
- >Mathematics and intuition agree here, that an infinite number of 32 bit
- >words contains an infinite number of bits.
-
- As noted above, this model violates ANSI C because it would lead
- to an infinite sizeof(char *) which breaks at least one strictly
- conforming program (all bytes must be addressible).
-
- The reverse, a model with a finite number of containers, each
- of which can store an arbitrarily large integer, also violates
- ANSI C. The reasoning goes as follows: sizeof(x) gives the
- number of bytes in x and must be finite (see above). It is
- required that each byte of an object be uniquely addressable
- (1.6 def'n of byte). Of necessity, one must then define the
- byte as the arbitrarily sized container. The definition of byte
- in ANSI C (1.6) refers to a low order bit and a high order bit.
- Hence, a byte is a bounded and finite quantity. This leads to a
- contradiction.
-
- As further evidence of the ANSI C requirement for finite
- containers, I could cite the definition of integral types in
- 3.1.2.5, the rules for integral promotion, the rationale, etc.
- It's really moot. The point is that Jeffrey's Turing model
- doesn't match the real world of machines and standards.
-
- Bottom line
- -----------
-
- The ANSI C memory model requires a finite number of finite-sized
- containers. By extension, the POSIX.1 memory model has the same
- requirements. Turing undecidability results require an infinite
- state space. There is no undecidability in a finite state space.
- Proofs to the contrary will be welcomed in comp.theory.
-
- This corresponds quite closely to everyone's (well, almost
- everyone's) intuition. The real world does not accept Jeffrey's
- undecidability argument. If he were correct, test suites for
- most standards would be compromised by these undecidability
- issues. In practice, they don't arise.
-
- Here's a challenge to Jeffrey: give an example from POSIX.1
- where his Turing model undecidability would invalidate an
- otherwise legitimate assertion.
-
- --
- Dave Cline dave@88open.org
- Spring Valley Software
-
- [ Note the reference to comp.theory. Note the previous comments by
- me, your moderator. Note that anyone who tries my patience will
- not get any truffles the next time I bring them to UseNIX 8-).
- Above all, please note that this is not alt.flame, and my apologies
- for not being up to snuff recently -- mod ]
-
- Volume-Number: Volume 31, Number 30
-
-